﻿using UnityEngine;
using System.Collections;

public class BGs : MonoBehaviour {
    public float speed = 10;
    Material mat;
    Vector2 offset;
	// Use this for initialization
	void Start () {
        mat = this.GetComponent<MeshRenderer>().material;
	}
	
	// Update is called once per frame
	void Update () {
        offset.y += speed * 0.01f * Time.deltaTime;
        mat.SetTextureOffset("_MainTex",offset);
	}
}
